package com.nowcoder.community.entity.form;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;


@Data
public class RegisterForm{
    @NotBlank(message = "验证码不能为空")
    private String verifyCode;

    @NotEmpty(message = "用户名不能为空")
    @Length(min = 2, max = 16, message = "长度必须在2~16之间.")
    private String username;
    private String password;

    @Email(message = "无效的邮箱")
    private String email;
}
